home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / c / CLib37x.readme < prev    next >
Encoding:
Text File  |  1998-10-31  |  18.1 KB  |  381 lines

  1. Short:    Example.library in 100% C (SAS/Storm/Maxon/GCC/VBCC/DICE/...)
  2. Author:   (various, see below)
  3. Uploader: Andreas_Kleinert@t-online.de
  4. Type:     dev/c
  5. Requires: rexxtricks.library V38+, rexxdossupport.library V2+
  6.  
  7.   example.library V37.32 (15.5.98)
  8.  
  9.   An Amiga shared library in 100 % C language - coming with sources.
  10.  
  11.   Compiler Checklist:        Compiler           Support
  12.                              -------------------------------
  13.    (see README.<compiler>    SAS/C 6.5x         yes
  14.     for more information)    MaxonC 3.x         yes
  15.                              StormC 2.x         yes
  16.                              DICE 3.x           yes
  17.                              GCC 2.7.2.1        yes
  18.                              vbcc 0.5+          yes
  19.                              AztecC             (not tested)
  20.  
  21.   OS Checklist:              Operating System   Support
  22.                              -------------------------------
  23.                              Amiga OS 37-40     yes
  24.                              AROS 1.x           yes (AROS source tree)
  25.  
  26.  
  27.   Original SAS/C and StormC version (C) 1996-98 by Andreas R. Kleinert,
  28.   MaxonC version changes done 1996 by Helmut Hummel and Stephan Rupprecht.
  29.   GCC version changes done 1997 by Stefan Fuchs and Gunter Nikl.
  30.   AROS source tree done 1997 by Aaron Digulla.
  31.   VBCC version changes done 1997 by Patrizio Biancalani and Patrick Burnand.
  32.   DICE adaptation done 1998 by Patrick Burnand.
  33.   All rights reserved.
  34.   ----------------------------------------------------------------------
  35.   This sample library intends to make Amiga shared library sources
  36.   compileable with any available Amiga C compiler - without any
  37.   changes to the source code.
  38.   And maybe in the future also running under any Amiga compatible
  39.   operating system with any CPU.
  40.  
  41.   The first goal seams to be easily done: nearly any noticeable compiler
  42.   for the Amiga does support generation of libraries by special
  43.   linker commands and pre-generated object files.
  44.  
  45.   But when looking into the details, one will find out, that these
  46.   linker functionality just reduces the influence of the programmer
  47.   on how his sources are handled, that the pre-generated object
  48.   files just originally were done in Assembler, and that each compiler
  49.   does define its own interface definitions and usage rules.
  50.  
  51.   But as a programmer, it is important to have control over the _complete_
  52.   source code and to be able to compile it _anywhere_ with only
  53.   minor changes, even better without any changes.
  54.  
  55.   Since most Amiga system modules - noticeable Libraries, Devices and
  56.   Resources - do have startup-modules and other larger parts completely
  57.   written in Assembler language, the most important task for getting
  58.   inter-compiler and operating system independant sources in my opinion
  59.   is, to completely migrate the interfaces to C language (but different
  60.   to AROS, for example, it is most important, to keep the sources running
  61.   under the current 68k AmigaOS in the _first_ place).
  62.  
  63.   This goal basically has been reached already, still missing of
  64.   course are some of the less Amiga-native compilers and of course
  65.   tests with any kind of "AmigaOS for PowerPC".
  66.  
  67.   But since Assembler is nearly as portability-hostile as BCPL _today_
  68.   we may come quite close to the goal defined above by just moving
  69.   towards C.
  70.  
  71.   Translate your 68k-assembler library startup-codes smartly
  72.   to C by simply using this source-code as an advice how to do it.
  73.  
  74.   For testing: install the (re)compiled example.library to LIBS: and
  75.   start the test program - it should pop up a requester, then.
  76.  
  77.   If you can submit adjustments for the other compilers as mentioned
  78.   above: feel free to send these.
  79.   ---
  80.   Feel free to use this source for own projects.
  81.  
  82.   It is allowed to be spread and distributed anywhere, as far
  83.   as my consent is concerned.
  84.  
  85.   Amiga International, or the current owner of the technologie,
  86.   is allowed to always put this source on their newest
  87.   Developer CD-ROM.
  88.  
  89.   Thanks and credits will always be appreciated - for example,
  90.   you MAY, but NEED NOT:
  91.   give me credits in your program's docs, send me keyfiles for
  92.   your programs using the library, and so on.
  93.   But that's simply voluntarily.
  94.  
  95.    _________________________________________________________
  96.   |      You may reach me the following way.                |
  97.   |    Send bug-reports, money or whatever to:              |
  98.   |---------------------------------------------------------|
  99.   |        * SuperView Development & Registration *         |
  100.   |          * DRAFU Development & Registration *           |
  101.   |       * Image Engineer Registration Site Europe *       |
  102.   |                                                         |
  103.   |                                                         |
  104.   |                  PerSuaSiVe SoftWorX                    |
  105.   |                                                         |
  106.   |                  Andreas R. Kleinert                    |
  107.   |                  Sandstrasse 1                          |
  108.   |                  D-57072 Siegen                         |
  109.   |                  Germany, Europe                        |
  110.   |                                                         |
  111.   | Any snail mail to the old address will still be routed. |
  112.   |                                                         |
  113.   |                  Phone:  +49-271-22869 also FAX + AM    |
  114.   |                          +49-271-22838                  |
  115.   |                                                         |
  116.   |                  Weekdays after 17.00h.                 |
  117.   |                                                         |
  118.   |         When calling via phone you may leave a message, |
  119.   |         if I'm not available - but don't expect me      |
  120.   |         calling back to USA, Australia, ... since       |
  121.   |         german phone rates are HIGHLY expensive.        |
  122.   |_________________________________________________________|
  123.  
  124.     http://home.t-online.de/home/Andreas_Kleinert/
  125.  
  126.   eMail:
  127.  
  128.         Please send binaries via ARK@News.wwbnet.de, and keep
  129.         them smaller than 16 KB. Please think twice before
  130.         sending them - my postbox is not unlimited in size.
  131.  
  132.            - Fido    Andreas Kleinert 2:2457/350.18
  133.            - Usenet
  134.                      Andreas_Kleinert@superview.ftn.neckar-alb.de (Fido-Gate)
  135.                      Andreas_Kleinert@t-online.de                 (T-Online)
  136.                      ARK@News.wwbnet.de                           (Z-Netz)
  137.                      ARK@amigaworld.com                           (AmigaWorld)
  138.  
  139.            - If nothing else works, try one of these public
  140.              Fido-Usenet gateways:
  141.  
  142.                In Germany:
  143.                  Andreas_Kleinert@p18.f350.n2457.z2.fido.sub.org
  144.  
  145.                From USA or elsewhere:
  146.                  Andreas_Kleinert@p18.f350.n2457.z2.fidonet.org
  147.  
  148.  
  149.  Known Bugs:        - some versions of DOpus and all Installer versions
  150.                       can't fetch the version information from the
  151.                       library binary due to some bugs in their code.
  152.                       Newer DOpus versions have this fixed and C:Version
  153.                       for example did that task always.
  154.  
  155.  
  156.  History:
  157.  
  158.  V37.32 (15.05.98): - additional macros for function prototypes
  159.                     - use libdefs.config to set name, version etc. of library
  160.                     - GenLibDefs.rexx: generates libdefs.h
  161.                     - GenFDClibFTab.rexx: generates FD, CLIB and
  162.                       functionTable.h files
  163.                     - reformat sources to 75 character/line
  164.                     - change makefile.gcc
  165.  
  166.  V37.31 (18.03.98): - changed SEGLISTPTR type definition for VBCC
  167.                       (-> Patrick Burnand)
  168.                     - fixed some typos and improved style in several
  169.                       source modules and headers
  170.  
  171.  V37.30 (07.03.98): - added DICE support, done by Patrick Burnand
  172.                       <pburnand@hotmail.com>
  173.                       He modified LibInit.c and StartUp.c to avoid a possible
  174.                       bug in DICE.  The 'extern' keyword might not always be
  175.                       supported well.  (extern struct ExampleBase*...)
  176.                     - added some typecasts to InitTable definition
  177.                       (so that the other compilers can't complain about the
  178.                        changes done for DICE)
  179.                     - simplified sample program
  180.                     - again fixed type definition of "seglist" pointer;
  181.                       it's now a global typedef-inition/#define in compiler.h
  182.                       (SEGLISTPTR) so everyone should be happy again
  183.                       (-> Sven Drieling)
  184.  
  185.  V37.22 (29.12.97): - fixed TestExampleLib.c
  186.                       (-> Stephan Rupprecht)
  187.                     - updated Stephan's email address
  188.                       (now is: stephan.rupprecht@metronet.de)
  189.                     - renamed "c_lib" directory and "ReadMe_First"
  190.                       to CLib37x#?
  191.  
  192.  V37.21 (19.12.97): - adjusted "compiler.h" as suggested by Volker Barthelmann
  193.                       (VBCC), done by Patrizio Biancalani
  194.                     - updated Patrizio's email address (-> ReadMe.VBCC)
  195.                     - fixed my email, too (how did that COB.wwbnet.de make
  196.                       it into this readme again ?)
  197.                     - "compiler.h" now protected from multiple #inclusion
  198.  
  199.  V37.20 (02.12.97): - added VBCC support, done by Patrizio Biancalani
  200.                       <P.Biancalani@agora.stm.it>
  201.  
  202.  V37.17 (24.10.97): - updated "ReadMe_MAXON" and added a bug-description
  203.                       (plus workaround) as supplied by Stephan Rupprecht
  204.                       <Rupprecht_Verwertung@t-online.de>
  205.                       [ 29/12/97: stephan.rupprecht@metronet.de ]
  206.  
  207.  V37.16 (23.8.97) : - V37.15 - frozen AROS spin-off
  208.                     - AROS-Version now included with AROS package, separately
  209.                     - added comments about Forbid/Permit/Wait/single-threading
  210.                       to the Library access functions
  211.                     - also commented the rest a little bit
  212.                       (-> maybe some certain people from comp.sys.amiga.programmer
  213.                           now feel better - but then again... maybe not ;)
  214.  
  215.  V37.14 (13.8.97) : - AROS: - the LH1_ to LH2_ macro replacements in
  216.                               "compiler.h" had been wrongly defined
  217.                             - "BPTR" type only was available under AROS,
  218.                               now using "struct SegList *"
  219.                             - AROS version now does compile under AmigaOS
  220.                               with SAS/C 6.58, too
  221.                     - "APTR seglist" now "struct SegList *"
  222.  
  223.  V37.13 (19.7.97) : - GNU makefile had lost its TABs
  224.                       (-> Gunter Nikl)
  225.  
  226.  V37.12 (29.6.97) : - fixed memory bug-fix (argh)
  227.                       (-> Gunter Nikl)
  228.                     - changed/applied GCC adjustments
  229.                       (-> diffs by Gunter Nikl)
  230.  
  231.  V37.11 (24.6.97) : - added "known bugs" section
  232.                     - LibInit now delocates library base on error
  233.                       (NULL return)
  234.                       (-> Gunter Nikl)
  235.                     - added AROS version, and created an additional
  236.                       source tree for it, since I did not get it compiled
  237.                       with SAS/C 6.57 and there's perhaps additional
  238.                       #ifdef stuf to be done. Anyone likes to merge these ?
  239.                       (-> Aaron Digulla)
  240.  
  241.  V37.10 (6.4.97) :  - added GCC version by Stefan Fuchs, snfuchs@sokrates.franken.de.
  242.                       Thanks !
  243.                     - some small changes to docs, includes and comments
  244.                     - still missing: DICE, Aztec, vbcc. Who does it ?
  245.                     - fixed ftn email address
  246.  
  247.  V37.6 (27.3.97) :  - finetuning
  248.  
  249.  V37.5 (24.1.97) :  - rewrote docs
  250.                     - added basic support for compiler independent
  251.                       register naming and SAS/C keyword replacements
  252.                       (compiler.h). Thus sources now should be easily
  253.                       adaptable for GCC as well.
  254.  
  255.  V37.4 (8.1.97) :   - added FD file
  256.                     - added new pragma file (and dir) as
  257.                       include/pragma/example_lib.h
  258.                       which works with Aztec, Maxon, Storm,
  259.                       DICE and SAS C compilers.
  260.                       Thanks to fd2pragma and Dirk Stoecker.
  261.                     - some fixes to the readme files
  262.                     - updated eMail list
  263.  
  264.  V37.3 (3.1.97) :   - slightly changed SCOPTIONS
  265.                     - fixed some style things (APTR and library casts)
  266.                     - changed note about library opening at L_OpenLibs()
  267.                     - now compileable with StormC 2.0 as well
  268.                       (not tested with 1.1) - see readme file for StormC
  269.                     - added project file for StormC 2.0, smakefile still
  270.                       present - select, which one you'd like to use
  271.  
  272.  V37.2 (12.12.96) : - applied some more changes and fixes
  273.                       (-> suggested by Helmut Hummel)
  274.                     - added icons
  275.                       (-> from Helmut Hummel)
  276.  
  277.  V37.1 (4.12.96) : - bumped version to V37
  278.                    - added MaxonC 3.x version by applying changes
  279.                      to the SAS/C sources and adding Maxon
  280.                      specific make and configuration files
  281.                      (-> all done by Helmut Hummel, see Readme.MAXON)
  282.                    - added StormC support
  283.                    - yet missing: DICE, Aztec, GNU. Who does it ?
  284.  
  285.  V1.4 (30.11.96) : - added SAS/C specific Ctrl-C disabling code
  286.                    - made some workarounds compiler sensitive
  287.                    - redone all with SAS/C V6.57
  288.                    - 944 Bytes ;-)
  289.  
  290.  V1.3 (13.9.96) :  - when starting lib as executable, -1 must be returned
  291.                    - now caching SysBase
  292.                    - added some comments, where changes should not
  293.                      be applied
  294.                    - added note about sharing library bases
  295.                    - documented and modified sample function,
  296.                      so that correct a0/a1/d0/d1 and a6 usage becomes
  297.                      more obviously and verbose
  298.                    - still 940 bytes ;-)
  299.  
  300.  V1.2 (5.9.96)  :  - fixed some things resulting out of a
  301.                      discussion in Z-Netz
  302.  
  303.  V1.1 (1.9.96)  :  - small changes in style
  304.                      (only bumped versions of changed modules):
  305.                        o moved "examplebase.h" to include/example/
  306.                          (so also adjusted LibInit.c, StartUp.c
  307.                           and SCOPTIONS for reflecting that)
  308.                        o SampleFuncs.h did contain wrong prototype
  309.                          (did not matter, since only used for
  310.                           ULONG function table within StartUp.c)
  311.                        o explicitely __aligned ROMTag structure
  312.  
  313.  V1.0 (14.8.96) : - first release
  314.  
  315.  
  316.  ---
  317.  All mentioned trademarks are subject to their owners.
  318.  
  319.  
  320. ============================= Archive contents =============================
  321.  
  322. Original  Packed Ratio    Date     Time    Name
  323. -------- ------- ----- --------- --------  -------------
  324.     1720     433 74.8% 11-Dec-96 15:39:54 +bin.info
  325.     5252    3484 33.6% 07-Mar-98 13:52:12 +TestExampleLib
  326.      450     230 48.8% 11-Dec-96 15:49:34 +TestExampleLib.info
  327.    15107    5342 64.6% 15-May-98 17:16:26 +CLib37x.readme
  328.     7358    2526 65.6% 17-May-98 23:04:32 +CLib37.dok
  329.      888     600 32.4% 18-Mar-98 09:47:42 +example.library
  330.     2101    1066 49.2% 23-Aug-97 11:40:22 +ReadMe.AROS
  331.     1209     658 45.5% 07-Mar-98 13:28:48 +ReadMe.DICE
  332.     1884     861 54.2% 01-Apr-97 11:27:18 +ReadMe.GCC
  333.     1844     985 46.5% 29-Dec-97 20:02:56 +ReadMe.MAXON
  334.      503     288 42.7% 29-Dec-97 20:03:44 +ReadMe.SAS
  335.      936     496 47.0% 29-Dec-97 20:04:02 +ReadMe.STORM
  336.      778     424 45.5% 19-Dec-97 09:13:50 +ReadMe.VBCC
  337.    10659    3141 70.5% 15-May-98 18:51:36 +GenFDCLIBFctTab.rexx
  338.     3801    1358 64.2% 12-May-98 22:46:34 +GenLibdefs.rexx
  339.     1720     433 74.8% 11-Dec-96 15:39:56 +source.info
  340.       95      92  3.1% 15-May-98 18:51:58 +example_lib.fd
  341.      504     284 43.6% 15-May-98 18:52:00 +example_protos.h
  342.      289     185 35.9% 05-Dec-96 11:44:58 +example.h
  343.      657     323 50.8% 07-Mar-98 13:50:38 +examplebase.h
  344.      495     252 49.0% 15-May-98 18:52:32 +example.h
  345.      477     247 48.2% 08-Jan-97 19:10:26 +example_lib.h
  346.      311     207 33.4% 05-Dec-96 11:45:38 +example_pragmas.h
  347.      403     217 46.1% 15-May-98 18:52:32 +example.h
  348.     1720     433 74.8% 11-Dec-96 15:39:42 +lib_source.info
  349.     7760    1964 74.6% 13-May-98 00:58:28 +compiler.h
  350.      860     612 28.8% 15-May-98 18:52:30 +example.library
  351.      653     362 44.5% 15-May-98 18:51:58 +FunctionTable.h
  352.      143     111 22.3% 15-May-98 18:04:14 +libdefs.config
  353.      484     260 46.2% 15-May-98 18:38:32 +libdefs.h
  354.     5282    1888 64.2% 15-May-98 17:38:00 +LibInit.c
  355.       25      25  0.0% 05-Dec-96 12:07:46 +make_storm.bat
  356.      360     186 48.3% 07-Mar-98 13:28:48 +makefile.dice
  357.      427     223 47.7% 19-Jul-97 14:07:00 +makefile.gcc
  358.     1465     580 60.4% 15-May-98 18:29:50 +makefile.gcc2
  359.      419     164 60.8% 11-Dec-96 15:31:14 +makefile.MAXON
  360.      347     232 33.1% 05-Dec-96 11:36:28 +makefile.MAXON.info
  361.      347     181 47.8% 02-Dec-97 10:34:46 +makefile.vbcc
  362.      381     232 39.1% 05-Dec-96 11:36:28 +mcpp.SESSION
  363.     2385    1087 54.4% 15-May-98 18:51:42 +SampleFuncs.c
  364.      370     248 32.9% 02-Dec-97 10:34:46 +SampleFuncs.h
  365.      128     105 17.9% 03-Jan-97 15:29:36 +SCOPTIONS
  366.      395     148 62.5% 05-Dec-96 11:36:28 +smakefile
  367.       95      85 10.5% 05-Dec-96 11:36:28 +smakefile.wth
  368.     9845    2502 74.5% 15-May-98 17:39:40 +StartUp.c
  369.     1757     595 66.1% 03-Jan-97 15:44:56 +storm_project.¶
  370.      624     350 43.9% 03-Jan-97 15:44:56 +storm_project.¶.info
  371.      622     269 56.7% 03-Jan-97 15:44:30 +storm_smakefile
  372.     6612    3421 48.2% 15-May-98 19:01:44 +a.out
  373.      119     100 15.9% 05-Dec-96 11:36:28 +SCOPTIONS
  374.      256     105 58.9% 05-Dec-96 11:36:28 +smakefile
  375.     5252    3484 33.6% 07-Mar-98 13:52:12 +TestExampleLib
  376.      855     432 49.4% 15-May-98 19:00:40 +TestExampleLib.c
  377.      835     394 52.8% 05-Dec-96 11:36:28 +TestExampleLib.info
  378.      380     278 26.8% 07-Mar-98 13:52:10 +TestExampleLib.o
  379. -------- ------- ----- --------- --------
  380.   110644   45188 59.1% 05-Sep-98 22:52:20   55 files
  381.